<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./template.xhtml">

    <ui:define name="title">
        Tỷ lệ cá cược - Kèo châu á, châu âu
    </ui:define>

    <ui:define name="content">
        <h:form>
            <h:panelGrid columns="2">
                <font color="RED" size="5">Thông tin trận đấu:  <h:outputText value="#{rateOfSoccer.match}" style="font-size:20pt; color: red;" /></font>
            </h:panelGrid>
            <!--            <p:poll id="p1" interval="30" listener="" update="asianOnlineFT,asianOnlineHT" />-->
            <p:panel header="Tỷ lệ châu á online">
                <p:dataTable id="asianOnlineFT" value="#{rateOfSoccer.asiaOnlineRateFT}" var="aOnline" resizableColumns="true"
                             emptyMessage="Chưa có thông tin"  rendered="true"> 
                    <f:facet name="header">  
                        Tỷ lệ cả trận  
                    </f:facet>  
                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Chủ" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.chuAnMat}" /> </b>
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Tỷ lệ" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.tyLeChap}" /></b>
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Khách" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.khachAnMat}"/></b>  
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Số bàn thắng" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.soBanThang}"/></b>    
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Trên" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.trenAn}"/></b> 
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Dưới" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnline.duoiAn}"/></b> 
                    </p:column>

                </p:dataTable>
                <p:dataTable id="asianOnlineHT" value="#{rateOfSoccer.asiaOnlineRateHT}" var="aOnlineHT" resizableColumns="true" emptyMessage="Chưa có thông tin"
                             rendered="true"> 
                    <f:facet name="header">  
                        Tỷ lệ hiệp một  
                    </f:facet>  
                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Chủ" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.chuAnMat}" /></b>  
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Tỷ lệ" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.tyLeChap}" /></b>  
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Khách" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.khachAnMat}"/></b>
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Số bàn thắng" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.soBanThang}"/></b>    
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Trên" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.trenAn}"/></b> 
                    </p:column>

                    <p:column>  
                        <f:facet name="header">  
                            <h:outputText value="Dưới" />  
                        </f:facet>  
                        <b><h:outputText value="#{aOnlineHT.duoiAn}"/></b> 
                    </p:column>

                </p:dataTable>
            </p:panel>
            <br/>
<!--            <p:poll id="p2" interval="30" listener="" update="asian,taixiu,euro" />-->
            <p:panel header="Tỷ lệ châu á - Tỷ lệ châu âu">
                <h:panelGrid columns="3">
                    <p:dataTable id="asian" value="#{rateOfSoccer.asiaRate}" var="aR" resizableColumns="true" emptyMessage="Chưa có thông tin"
                                 rendered="true"> 
                        <f:facet name="header">  
                            <h:outputText value="Tỷ lệ châu á" />  
                        </f:facet>  
                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Chủ" />  
                            </f:facet>  
                            <b><h:outputText value="#{aR.chuAnMat}" /></b>  
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Tỷ lệ" />  
                            </f:facet>  
                            <b><h:outputText value="#{aR.tyLeChap}" /></b>  
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Khách" />  
                            </f:facet>  
                            <b><h:outputText value="#{aR.khachAnMat}"/></b>  
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Nguồn dữ liệu" />  
                            </f:facet>  
                            <h:outputText value="#{aR.nguonDuLieu}" />
                        </p:column>

                    </p:dataTable>
                    <p:dataTable id="taixiu" value="#{rateOfSoccer.ou}" var="ouR" resizableColumns="true"
                                 emptyMessage="Chưa có thông tin" rendered="true"> 
                        <f:facet name="header">  
                            <h:outputText value="Tài Xỉu" />  
                        </f:facet>  
                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Số bàn thắng" />  
                            </f:facet>  
                            <b><h:outputText value="#{ouR.soBanThang}"/></b>   
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Trên" />  
                            </f:facet>  
                            <b><h:outputText value="#{ouR.trenAn}"/></b>
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Dưới" />  
                            </f:facet>  
                            <b><h:outputText value="#{ouR.duoiAn}"/></b>
                        </p:column>

                    </p:dataTable>
                    <p:dataTable id="euro" value="#{rateOfSoccer.euro}" var="eu" resizableColumns="true"
                                 emptyMessage="Chưa có thông tin" rendered="true"> 
                        <f:facet name="header">  
                            <h:outputText value="Tỷ lệ châu âu" />  
                        </f:facet>  
                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Thắng" />  
                            </f:facet>  
                            <b><h:outputText value="#{eu.chuThang}"/></b>  
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Hòa" />  
                            </f:facet>  
                            <b><h:outputText value="#{eu.hoa}"/></b>
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Thua" />  
                            </f:facet>  
                            <b><h:outputText value="#{eu.khachThang}" /></b>
                        </p:column>

                        <p:column>  
                            <f:facet name="header">  
                                <h:outputText value="Nguồn dữ liệu" />  
                            </f:facet>  
                            <h:outputText value="#{eu.nguonDuLieu}" />
                        </p:column>

                    </p:dataTable>
                </h:panelGrid>

            </p:panel>
        </h:form>
    </ui:define>

</ui:composition>
